import pandas as pd
from sklearn.preprocessing import LabelEncoder

data_source = pd.read_excel("iris.xlsx")
x = data_source[['花萼长度', '花萼宽度', '花瓣长度', '花瓣宽度']]
y = data_source['属种']

print(x.shape[1])
encoder = LabelEncoder()
y = encoder.fit_transform(y)
print(encoder.classes_)
